{% extends 'index.html' %}
{% block body %}
        <table cellpadding="0" cellspacing="3" border="0">
            <tr>
                <th>Magazzino</th>
                <th>Articolo</th>
                <th>Giacenza</th>
                {% if "SchedaLavorazione" in environment.modulesList %}
                <th>Impegnato</th>
                {% endif %}
                <th>Valore Giacenza</th>
                <th>Scorta minima</th>
                <th>Data fine scorte</th>
                <th>Data prossimo ordine</th>
            </tr>
            <tr><td colspan="7"><hr /></td></tr>
            {% for dao in objects %}
            <tr class="row">
                <td class="detail">{{dao.magazzino}}</td>
                <td class="detail">{{dao.articolo}}</td>
                <td class="number">{{environment.conf.number_format % ( dao.giacenza )}}</td>
                {% if "SchedaLavorazione" in environment.modulesList %}
                    <td class="number">{{ dao.impegnato}}</td>
                {% endif %}
                <td class="totale-number" style="text-align:center;"><strong>{{'%14.2f' % (dao.valoreGiacenza, )}}</strong></td>
                <td class="detail">{{dao.scorta_minima}}</td>
                 {% if dao.data_fine_scorte %}
                <td class="detail">{{utils.dateToString(dao.data_fine_scorte)}}</td>
                {% else %}
                <td class="detail">-</td>
                {% endif %}
                {% if dao.data_prossimo_ordine %}
                <td class="detail">{{utils.dateToString(dao.data_prossimo_ordine)}}</td>
                 {% else %}
                <td class="detail">-</td>
                {% endif %}
            </tr>
            {% endfor %}
        </table>
{% endblock %}
